package com.smart.model.convert;

import com.smart.model.dtomapper.OperateUserDtoMapper;
import com.smart.model.domain.OperateUserDO;
import com.smart.model.vo.OperateUserVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class OperateUserConvert {

    public static List<OperateUserVO> buildOperateUserVoList(List<OperateUserDO> operateUserDOList) {
        if (CollectionUtils.isEmpty(operateUserDOList)) {
            return Lists.newArrayList();
        }
        List<OperateUserVO> operateUserVOList = new ArrayList<>();
        for (OperateUserDO operateUserDO : operateUserDOList) {
            operateUserVOList.add(OperateUserDtoMapper.INSTANCE.do2VO(operateUserDO));
        }

        return operateUserVOList;
    }
}
